<div class="pa clearfix">
  <div class="span-p70 colborder">
    <h3>博客文章列表</h3>
    <hr/>
    <div>
      <table>
        <tr>
          <th>Id</th>
          <th>标题</th>
          <th>分类</th>
          <th>操作</th>
        </tr>
        <% @articles.each do |article| %>
        <tr>
          <td><%= article.id %></td>
          <td><%= link_to article.title, "/blog?category=#{article.category.id}&article=#{article.id}", :target => '_blank' %></td>
          <td><%= article.category.name %></td>
          <td>
            <%= link_to '编辑', "/articles/edit/#{article.id}" %> |
            <%= link_to '删除', "/articles/delete/#{article.id}", :confirm => '你确认要删除吗？' %>
          </td>
        </tr>
        <% end %>
      </table>
      <div class="c666">
        <%= will_paginate @articles %>
      </div>
    </div>
  </div>
  <div class="span-5 last">
    <%= render 'layouts/admin/articles_sidebar' %>
  </div>
</div>